package _07_priority_queue.my_implements;

import _07_priority_queue.Priority;

import java.util.StringJoiner;

/**
 * @author: mornd
 * @dateTime: 2023/6/8 - 1:14
 */
public class Entity implements Priority {
    String name;
    int priority;

    public Entity(String name, int priority) {
        this.name = name;
        this.priority = priority;
    }

    @Override
    public int priority() {
        return priority;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Entity.class.getSimpleName() + "[", "]")
                .add("name='" + name + "'")
                .add("priority=" + priority)
                .toString();
    }
}
